#include "chat.h"

chat::chat(QTcpSocket *s, QWidget *parent)
	: QWidget(parent)
{
	ui.setupUi(this);
	this->socket = s;
}

chat::~chat()
{}


void chat::on_sendButton_clicked()
{
	QByteArray ba;
	ba.append(ui.lineEdit->text());
	this->socket->write(ba);
}

void chat::on_clearButton_clicked()
{
	ui.lineEdit->clear();
}
